package com.scm.service;

import com.scm.common.core.domain.entity.SysUser;
import com.scm.common.core.page.PageDomain;
import com.scm.dto.req.purchase.SaveScmPurchaseReq;
import com.scm.dto.resp.QueryPurchasePageResp;
import com.scm.persist.model.ScmPurchaseQuotationDetail;
import com.scm.persist.model.purchase.ScmPurchase;
import com.scm.persist.model.purchase.ScmPurchaseInventoryDetail;

import java.util.List;

/**
 * 采购Service接口
 *
 * @author reptilemanager
 * @date 2024-03-24
 */
public interface IScmPurchaseService
{
    /**
     * 查询采购
     *
     * @param id 采购主键
     * @return 采购
     */
    public ScmPurchase selectScmPurchaseById(Long id);

    /**
     * 查询采购列表
     *
     * @param scmPurchase 采购
     * @return 采购集合
     */
    public List<ScmPurchase> selectScmPurchaseList(ScmPurchase scmPurchase);

     QueryPurchasePageResp selectScmPurchaseList(ScmPurchase scmPurchase, PageDomain pageDomain,SysUser sysUser);

    /**
     * 新增采购
     *
     * @param req 采购
     * @return 结果
     */
    public int insertScmPurchase(SaveScmPurchaseReq  req, SysUser sysUser);

    /**
     * 修改采购
     *
     * @param req 采购
     * @return 结果
     */
    public int updateScmPurchase(SaveScmPurchaseReq req,SysUser sysUser);

    /**
     * 批量删除采购
     *
     * @param ids 需要删除的采购主键集合
     * @return 结果
     */
    public int deleteScmPurchaseByIds(String ids);

    /**
     * 删除采购信息
     *
     * @param id 采购主键
     * @return 结果
     */
    public int deleteScmPurchaseById(Long id);

    /**
     * 查询采购下的商品
     * @param id
     * @return
     */
    List<ScmPurchaseQuotationDetail> selectScmPurchaseInventoryDetailList(Long id);

    void uploadPaymentVoucherPost(Long id, SysUser sysUser, String url);
}
